home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / PCI Driver Development Kit / • Samples / Driver Samples / Video samples / GDX 950717 / GDX / GraphicsCorePriv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-20  |  2.1 KB  |  65 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        GraphicsCorePriv.h
  3.  
  4.     Contains:    This has declarations that are private to the graphics 'core.'  Neither the HALs nor
  5.                 the OSS need any of this.
  6.  
  7.     Written by:    Sean Williams, Kevin Williams
  8.  
  9.     Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  10.  
  11.     Change History (most recent first):
  12.  
  13.          <1>     4/15/95    SW        First Checked In
  14.  
  15. */
  16.  
  17. #ifndef __GRAPHICSCOREPRIV__
  18. #define __GRAPHICSCOREPRIV__
  19.  
  20. #include "GraphicsPriv.h"
  21.  
  22. #include <Types.h>
  23. #include <Devices.h>
  24. #include <NameRegistry.h>
  25. #include <Video.h>
  26.  
  27.  
  28. //
  29. // GraphicsCoreData
  30. //    This structure contains the 'globals' needed to maintain the necessary state
  31. //    information regarding the graphics core.
  32. //
  33. typedef struct GraphicsCoreData GraphicsCoreData;
  34. struct GraphicsCoreData
  35. {
  36.     RegEntryID regEntryID;            // RegEntryID describing Graphics HW
  37.     AddressSpaceID spaceID;            // grabbed in Initialize 
  38.     DriverRefNum driverRefNum;        // Reference number of driver
  39.     DepthMode depthMode;            // Relative bit depth
  40.     UInt32 bitsPerPixel;            // Absolute bit depth
  41.     DisplayModeID displayModeID;    // Current display mode selector
  42.     DisplayCode displayCode;        // DisplayCode for the connected display
  43.     
  44.     // All the information that is needed for Core/OSS for all DisplayModeIDs
  45.     DisplayModeIDData masterTable[kMaxDisplayModeIDs];
  46.  
  47.     SInt16 currentPage;                // Current graphics page (0 based)
  48.     void *baseAddress;                // Base address of current page of frame buffer
  49.     GammaTbl *gammaTable;            // Current gamma table
  50.     unsigned long maxGammaTableSize;// Biggest gamma table allocated..reuse existing gamma if can fit
  51.     Boolean luminanceMapping;        // True if using luminance mapping
  52.     Boolean    monoOnly;                // True if attached display only support Monochrome
  53.     Boolean directColor;            // True for direct color, false for    indexed color
  54.     Boolean interruptsEnabled;        // True when VBL interrupts are enabled
  55.     Boolean driverOpen;                // True the driver is opened
  56.     Boolean replacingDriver;        // True if got a kReplaceCommand instead of kInitializeCommand
  57. };
  58.  
  59.  
  60. // Prototype for access function to core data
  61. GraphicsCoreData *GraphicsCoreGetCoreData(void);
  62.  
  63.  
  64. #endif    // __GRAPHICSCOREPRIV__
  65.